import { BoxShadow, Color } from "../meta";
import { FontOpts } from "../theme";
import {
  BgColorOpts,
  ComponentShadowMockOpts,
  DisabledMockOpts,
  IntentMockOpts,
  MaskMockOpts,
  TextMockOpts,
  ThemeNamable,
} from "./mock.type";

/**
 * 空值实例化,便于后期拆解结构
 */

export const mockIntent: IntentMockOpts = {
  themeName: "intent",
  color: {
    theme: Color,
    primary: Color,
    success: Color,
    warning: Color,
    danger: Color,
    error: Color,
    info: Color,
  },
};
export const BgColor: BgColorOpts = {
  themeName: "bg",
  color: {
    light: Color,
    dark: Color,
    info: Color,
  },
};
export const mockText: TextMockOpts = {
  themeName: "text",
  color: {
    primary: Color,
    regular: Color,
    secondary: Color,
    placeholder: Color,
    disabled: Color,
  },
};

export const mockFont: FontOpts & ThemeNamable = {
  themeName: "font",
  family: undefined,
  size: {
    extraLarge: undefined,
    large: undefined,
    medium: undefined,
    base: undefined,
    small: undefined,
    extraSmall: undefined,
  },
};

export const mockDisabled: DisabledMockOpts = {
  themeName: "disabled",
  color: {
    background: Color,
    text: Color,
    border: Color,
  },
};

export const mockComponentShadowOpts: ComponentShadowMockOpts = {
  themeName: "shadow",
  base: BoxShadow,
  light: BoxShadow,
  lighter: BoxShadow,
  dark: BoxShadow,
};

export const mockMaskOpts: MaskMockOpts = {
  themeName: "mask",
  color: Color,
};

export const mockTheme: { [k in any]: any } = {
  mockIntent,
  mockText,
  mockFont,
  mockDisabled,
  mockComponentShadowOpts,
  mockMaskOpts,
  BgColor,
};
export type MockThemeKeyType = keyof typeof mockTheme;
